using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

public class toEndUITrigger : MonoBehaviour
{
    private AudioSource music;
    void Start()
    {
        music = GetComponent<AudioSource>();
        Invoke(nameof(musicFinish),music.clip.length);
    }

    // Update is called once per frame
    void Update()
    {

    }
    private void musicFinish()
    {
        SceneManager.LoadScene("EndScene");
    }
    
}